<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="ChequesRecebidosEditDlg" widgetVar="ChequesRecebidosEditDialog" modal="true" resizable="false" appendTo="@(body)" header="#{bundle.EditChequesRecebidosTitle}">
            <h:form id="ChequesRecebidosEditForm">
                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{chequesRecebidosController.selected != null}">
                        <p:outputLabel value="#{bundle.EditChequesRecebidosLabel_id}" for="id" />
                        <p:inputText id="id" value="#{chequesRecebidosController.selected.id}" title="#{bundle.EditChequesRecebidosTitle_id}" required="true" requiredMessage="#{bundle.EditChequesRecebidosRequiredMessage_id}"/>
                        <p:outputLabel value="#{bundle.EditChequesRecebidosLabel_numero}" for="numero" />
                        <p:inputText id="numero" value="#{chequesRecebidosController.selected.numero}" title="#{bundle.EditChequesRecebidosTitle_numero}" required="true" requiredMessage="#{bundle.EditChequesRecebidosRequiredMessage_numero}"/>
                        <p:outputLabel value="#{bundle.EditChequesRecebidosLabel_tipoCheque}" for="tipoCheque" />
                        <p:inputText id="tipoCheque" value="#{chequesRecebidosController.selected.tipoCheque}" title="#{bundle.EditChequesRecebidosTitle_tipoCheque}" required="true" requiredMessage="#{bundle.EditChequesRecebidosRequiredMessage_tipoCheque}"/>
                        <p:outputLabel value="#{bundle.EditChequesRecebidosLabel_valor}" for="valor" />
                        <p:inputText id="valor" value="#{chequesRecebidosController.selected.valor}" title="#{bundle.EditChequesRecebidosTitle_valor}" required="true" requiredMessage="#{bundle.EditChequesRecebidosRequiredMessage_valor}"/>
                        <p:outputLabel value="#{bundle.EditChequesRecebidosLabel_cpfCnpj}" for="cpfCnpj" />
                        <p:inputText id="cpfCnpj" value="#{chequesRecebidosController.selected.cpfCnpj}" title="#{bundle.EditChequesRecebidosTitle_cpfCnpj}" required="true" requiredMessage="#{bundle.EditChequesRecebidosRequiredMessage_cpfCnpj}"/>
                        <p:outputLabel value="#{bundle.EditChequesRecebidosLabel_observacao}" for="observacao" />
                        <p:inputText id="observacao" value="#{chequesRecebidosController.selected.observacao}" title="#{bundle.EditChequesRecebidosTitle_observacao}" />
                        <p:outputLabel value="#{bundle.EditChequesRecebidosLabel_dataCadastramento}" for="dataCadastramento" />
                        <p:calendar id="dataCadastramento" pattern="MM/dd/yyyy" value="#{chequesRecebidosController.selected.dataCadastramento}" title="#{bundle.EditChequesRecebidosTitle_dataCadastramento}" required="true" requiredMessage="#{bundle.EditChequesRecebidosRequiredMessage_dataCadastramento}" showOn="button"/>
                        <p:outputLabel value="#{bundle.EditChequesRecebidosLabel_dataLancamento}" for="dataLancamento" />
                        <p:calendar id="dataLancamento" pattern="MM/dd/yyyy" value="#{chequesRecebidosController.selected.dataLancamento}" title="#{bundle.EditChequesRecebidosTitle_dataLancamento}"  showOn="button"/>
                        <p:outputLabel value="#{bundle.EditChequesRecebidosLabel_dataDesconto}" for="dataDesconto" />
                        <p:calendar id="dataDesconto" pattern="MM/dd/yyyy" value="#{chequesRecebidosController.selected.dataDesconto}" title="#{bundle.EditChequesRecebidosTitle_dataDesconto}"  showOn="button"/>
                        <p:outputLabel value="#{bundle.EditChequesRecebidosLabel_dataModificacao}" for="dataModificacao" />
                        <p:calendar id="dataModificacao" pattern="MM/dd/yyyy" value="#{chequesRecebidosController.selected.dataModificacao}" title="#{bundle.EditChequesRecebidosTitle_dataModificacao}"  showOn="button"/>
                        <p:outputLabel value="#{bundle.EditChequesRecebidosLabel_fundo}" for="fundo" />
                        <p:selectBooleanCheckbox id="fundo" value="#{chequesRecebidosController.selected.fundo}" />
                        <p:outputLabel value="#{bundle.EditChequesRecebidosLabel_baixado}" for="baixado" />
                        <p:selectBooleanCheckbox id="baixado" value="#{chequesRecebidosController.selected.baixado}" />
                        <p:outputLabel value="#{bundle.EditChequesRecebidosLabel_repassado}" for="repassado" />
                        <p:selectBooleanCheckbox id="repassado" value="#{chequesRecebidosController.selected.repassado}" />
                        <p:outputLabel value="#{bundle.EditChequesRecebidosLabel_cliente}" for="cliente" />
                        <p:selectOneMenu id="cliente" value="#{chequesRecebidosController.selected.cliente}" required="true" requiredMessage="#{bundle.EditChequesRecebidosRequiredMessage_cliente}">
                            <f:selectItem itemLabel="#{bundle.SelectOneMessage}"/>
                            <f:selectItems value="#{clienteController.itemsAvailableSelectOne}"
                                           var="clienteItem"
                                           itemValue="#{clienteItem}"/>
                        </p:selectOneMenu>
                        <p:outputLabel value="#{bundle.EditChequesRecebidosLabel_banco}" for="banco" />
                        <p:selectOneMenu id="banco" value="#{chequesRecebidosController.selected.banco}" required="true" requiredMessage="#{bundle.EditChequesRecebidosRequiredMessage_banco}">
                            <f:selectItem itemLabel="#{bundle.SelectOneMessage}"/>
                            <f:selectItems value="#{bancosController.itemsAvailableSelectOne}"
                                           var="bancoItem"
                                           itemValue="#{bancoItem}"/>
                        </p:selectOneMenu>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{chequesRecebidosController.update}" value="#{bundle.Save}" update="display,:ChequesRecebidosListForm:datalist,:growl" oncomplete="handleSubmit(args, 'ChequesRecebidosEditDialog');"/>
                    <p:commandButton value="#{bundle.Cancel}" onclick="ChequesRecebidosEditDialog.hide()"/>
                </h:panelGroup>
            </h:form>
        </p:dialog>

    </ui:composition>
</html>
